<%-- 
    Document   : EnseignantConsulteEC
    Created on : 4 jan. 2014, 18:13:58
    Author     : Frantz
--%>

<%@page import="Objet.EC"%>
<%@page import="java.util.StringTokenizer"%>
<%@page import="java.sql.Date"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.ArrayList"%>
<%@page import="Objet.Absence"%>
<%@page import="Objet.Enseignant"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Consultation des EC</title>
    </head>
    <body>
        <jsp:useBean id="co" scope="request" class="Objet.QueryBD"/>
        <jsp:useBean id="monAuth" scope="session" class="Form.FirstActionForm"/>
        
        <%
            Enseignant monEnseignant = co.creerEnseignant
                    ((String)monAuth.getLogin(),(String)monAuth.getMdp());
        %>
                

        <form method="POST" action="UpdateActionForm2.do">
            <center><h1>EC assurés par l'enseignant</h1>
            <table border ="1">
                <tr>
                    <th>Code Apoge</th>      
                    <th>Libelle</th>
                    <th>CM</th>
                    <th>TD</th>
                    <th>TP</th>
                    <th>Type_EC</th>

                </tr>
            <%
                String id = monEnseignant.getHarpege();
                ArrayList<EC> ListEC = 
                        new ArrayList(co.lesECEns(id));
                
                Iterator<EC> monIt = ListEC.iterator();
                
                String Code_Apoge;
                String Libelle;
                int CM;
                int TD;
                int TP;
                String Type_EC;
             
                while(monIt.hasNext())
                    {
                        EC UnEC = monIt.next();
                        
                        Code_Apoge = UnEC.getCode_Apoge();
                        Libelle = UnEC.getLib_EC();
                        CM = UnEC.getNB_HCM_EC();
                        TD = UnEC.getNB_HTD_EC();
                        TP = UnEC.getNB_HTP_EC();
                        
                        Type_EC = UnEC.getTYPE_EC();
                 
                        %>
                        <tr>

                                <td>
                                     <% out.println(Code_Apoge.toString()); %> 
 
                                </td>
                                
                                <td> 
                                    <% out.println(Libelle.toString()); %>  
                                </td>
                        
                                <td>
                                    <% out.println(CM); %> 
                                </td>
                                <td>
                                    <% out.println(TD); %>
                                </td>
                                <td>
                                    <% out.println(TP); %>
                                </td>    
                                <td>
                                    <% out.println(Type_EC.toString()); %>
                                </td>  
                    <% } %>

            </table>
            </center>
        </form>
    </body>
</html>
